<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button onclick="run()">点击</button>
 <script>
  //  location对象，定位对象(路径)
    console.log(location);
    // 获取当前文件的路径
    console.log(location.href);
   
    function run() {
       // 设置当前打开路径  页面跳转
        // location.href = "./3计时器.html";
    //    替换  原路径就不会被历史记录记录
        // location.replace = ("./3计时器.html");
// 刷新页面
        // location.reload()
// 在新的窗口打开
        //window.open("./3计时器.html");
    }
 </script>   
</body>
</html>